<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
    <div class="layui-form timo-compile">
    <form th:action="@{/base_infomation/baseInfomation/save}">
        <input type="hidden" name="id" th:if="${baseInfomation}" th:value="${baseInfomation.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">小区名字</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="name" placeholder="请输入小区名字" th:value="${baseInfomation?.name}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">小区负责人</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="responsible_name" placeholder="请输入小区负责人" th:value="${baseInfomation?.responsible_name}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">物业电话</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="phone" placeholder="请输入物业电话" th:value="${baseInfomation?.phone}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">地址</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="address" placeholder="请输入地址" th:value="${baseInfomation?.address}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">小区便民服务点</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="convenience_service_pointes" placeholder="请输入小区便民服务点" th:value="${baseInfomation?.convenience_service_pointes}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">物业位置</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="property_location" placeholder="请输入物业位置" th:value="${baseInfomation?.property_location}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">社区目前封闭状态</label>
            <div class="layui-input-inline">
<!--                <input class="layui-input" type="text" name="open_status" placeholder="请输入社区目前封闭状态" th:value="${baseInfomation?.open_status}">-->
<!--                TODO-->
                <input type="hidden" th:value="${baseInfomation?.open_status}">
                <input type="checkbox" name="open_status" lay-skin="switch" th:checked="${baseInfomation?.open_status == 1}" lay-filter="sfzs" lay-text="ON|OFF">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">社区服务群</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="group_a" placeholder="请输入社区服务群" th:value="${baseInfomation?.group_a}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">其他</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="other" placeholder="请输入其他" th:value="${baseInfomation?.other}">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea" name="remark">[[${baseInfomation?.remark}]]</textarea>
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
<script type="text/javascript">
    layui.use(['form'], function () {
        var form = layui.form;
        form.on('switch(sfzs)',function(data){
            console.log(data.value)
        })
    });

</script>
</body>
</html>